/**
 * 数据库连接
 */

const mongoose = require('mongoose')
const config = require('./index')
const log4js = require('./../utils/log4js')
mongoose.connect(config.URL)

const db = mongoose.connection;
console.log('数据库连接中-> -> ->');
db.on('error',()=>{
    log4js.error('数据库连接失败')
})
